﻿
using BCGM.MedicalWisdom.IServices;
using BCGM.MedicalWisdom.Services.BASE;
//using BCGM.MedicalWisdom.IRepository.Base;
using BCGM.MedicalWisdom.Model.BCGM_PatientModel;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using BCGM.MedicalWisdom.Repository.BASE;

namespace BCGM.MedicalWisdom.Services
{
    public class addressServices : BaseServices<address>, IaddressServices
    {
        private readonly IBaseRepository<address> _dal;
        public addressServices(IBaseRepository<address> dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
        }
        public async Task<List<address>> GetAddressesById(int pid)
        {
            var list = await _dal.Query();
            list = list.Where(s => s.PatientID == pid).ToList();
            return list;
        }
    }
}